<div class="container bgw contents">

  <div class="col-sm-10 col-sm-offset-2">
    <buttons selector="posts.selector"/>
  </div>

  <div class="col-sm-8 col-sm-offset-3">
    <search-by-date start-time=posts.startTime end-time="posts.endTime" need-search="view.needSearch"/>
  </div>

  <div ng-if="config.staff.roleType=='M'">
    <div class="animate-switch-container" ng-switch on="posts.selector">
      <div class="animate-switch" ng-switch-default>
        <div statistics-recharge start-time="posts.startTime" end-time="posts.endTime" need-search="view.needSearch" page="view.page" count="view.count" total="view.total"></div>
      </div>
      <div class="animate-switch" ng-switch-when="1">
        <div statistics-point  start-time="posts.startTime" end-time="posts.endTime" need-search="view.needSearch" page="view.page" count="view.count" total="view.total"></div>
      </div>
      <div class="animate-switch" ng-switch-when="2">
        <div statistics-coupon start-time="posts.startTime" end-time="posts.endTime" need-search="view.needSearch" page="view.page" count="view.count" total="view.total"></div>
      </div>
      <div class="animate-switch" ng-switch-when="3">
        <div statistics-sms  start-time="posts.startTime" end-time="posts.endTime" need-search="view.needSearch" page="view.page" count="view.count" total="view.total"></div>
      </div>
      <div class="animate-switch" ng-switch-when="4">
        <div statistics-relation start-time="posts.startTime" end-time="posts.endTime" need-search="view.needSearch" page="view.page" count="view.count" total="view.total"></div>
      </div>
    </div>
  </div>

  <div ng-if="config.staff.roleType=='K'">
    <div class="animate-switch-container" ng-switch on="posts.selector">
      <div class="animate-switch" ng-switch-default>
        <div statistics-recharge-detail start-time="posts.startTime" end-time="posts.endTime" need-search="view.needSearch"  page="view.page" count="view.count" total="view.total"></div>
      </div>
      <div class="animate-switch" ng-switch-when="1">
        <div statistics-point-detail start-time="posts.startTime" end-time="posts.endTime" need-search="view.needSearch" page="view.page" count="view.count"  total="view.total"></div>
      </div>
      <div class="animate-switch" ng-switch-when="2">
        <div statistics-coupon-detail start-time="posts.startTime" end-time="posts.endTime" need-search="view.needSearch" page="view.page" count="view.count" total="view.total"></div>
      </div>
      <div class="animate-switch" ng-switch-when="3">
        <div statistics-sms-detail start-time="posts.startTime" end-time="posts.endTime" need-search="view.needSearch" page="view.page" count="view.count" total="view.total"></div>
      </div>
      <div class="animate-switch" ng-switch-when="4">
        <div statistics-relation-detail start-time="posts.startTime" end-time="posts.endTime" need-search="view.needSearch" page="view.page" count="view.count" total="view.total"></div>
      </div>
    </div>
  </div>

  <div class="col-sm-12  text-left" ng-if="view.total===0">
    无查询结果
  </div>

  <div class="col-sm-12" ng-if="view.total>0&&view.total/view.count>1">
    <pagination items-per-page="view.count" boundary-links="true" total-items="view.total" ng-model="view.page" class="pagination-sm" previous-text="&lsaquo;" ng-change="pageChange()" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></pagination>
  </div>
</div>
